package com.ibeeking.found.cop.service.common.enums;

public enum DataTalkMsgTipEnum {
    MSG_TIP_IMAGE("image", "【图片消息】"),
    MSG_TIP_VOICE("voice", "【语音消息】"),
    MSG_TIP_VIDEO("video", "【视频消息】"),
    MSG_TIP_FILE("file", "【文件消息】"),
    MSG_TIP_SYSTEM("system", "【系统消息】"),
    MSG_TIP_REVOKE("revoke", "【撤回消息】"),
    MSG_TIP_FORWARD("forward", "【转发消息】"),
    MSG_TIP_LINK("link", "【链接消息】"),
    MSG_TIP_NEWS("news", "【图文消息】"),
    MSG_TIP_LOCATION("location", "【位置消息】"),
    MSG_TIP_WEAPP("weapp", "【小程序消息】"),
    MSG_TIP_EMOTION("emotion", "【表情符号】"),

    ;

    private String code;
    private String desc;

    DataTalkMsgTipEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(String code) {
        for (DataTalkMsgTipEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }
}
